﻿using UnityEngine;
using UnityEngine.Events;

public class ErrorPanel : BasePanel<ErrorPanel>
{
    event System.Action recoverEvent;
    public CustomGUIButton btnConfirm;
    void Start()
    {
        Hide();
        btnConfirm.clickEvent += () =>
        {
            Hide();
            recoverEvent.Invoke();
        };
    }

    public void SetRecover(System.Action action)
    {
        recoverEvent = action;
    }
}
